package ing.gzq.model;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * Created by gzq on 17-7-19.
 */
@Data
@NoArgsConstructor
public class Message<T> {

    public static String NEW_ICE_CANDIDATE = "new-ice-candidate";
    public static String NEW_CHECK_IN = "new-check-in";
    public static String NEW_CHECK_OUT = "new-check-out";
    public static String VIDEO_OFFER = "video-offer";
    public static String VIDEO_ANSWER = "video-answer";
    public static String SEND_MESSAGE = "send-message";
    public static String PUBLISH_QUESTION = "question-publish";
    public static String DELETE_QUESTION = "question-delete";
    public static String SEND_ANSWER = "send-answer";
    public static String ERROR = "error";

    public static Message<String> OPEN_LIVE_MESSAGE = new Message<>("live-open");
    public static Message<String> CLOSE_LIVE_MESSAGE = new Message<>("live-closed");
    public static Message<String> OPEN_CHAT_MESSAGE = new Message<>("chat-open");
    public static Message<String> CLOSE_CHAT_MESSAGE = new Message<>("chat-closed");
    public static Message<String> INFORM_OPEN = new Message<>("inform-open");
    public static Message<String> INFORM_CLOSE = new Message<>("inform-close");

    private String type;
    private String name;
    private String target;
    private T data;

    public Message(String type) {
        this.type = type;
    }
}
